package com.ruicar.afs.cloud.admin.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.regex.Pattern;

@AllArgsConstructor

public enum PassWordBaseRule {
    ANY("0","不限制字符",null),
    LEVEL1("1","必须包含数字",Pattern.compile("\\d+")),
    LEVEL2("2","必须包含小写字母",Pattern.compile("[a-z]+")),
    LEVEL3("3","必须包含大写字母",Pattern.compile("[A-Z]+")),
    LEVEL4("4","必须包含特殊字符",Pattern.compile("[^A-Za-z0-9]+")),
    ;
    @Getter
    private String code;
    @Getter
    private String desc;
    @Getter
    private Pattern pattern;
}
